In the standard asynchronous mode of communication, codes like STX (X'02) and ETX (X'03) have a special meaning, but they can sometimes occur in a stream of binary data, where that special meaning does not apply. To avoid ambiguity, Transparent Asynchronous Communications mode is used.
The Host port of the HSM must be configured for Transparent Async Communications and 8-bit data transfers. The message format for Transparent Async Communications is:
STX COUNT COMMAND\DATA LRC ETX
Where:
· STX is the Start of Text character (X'02).
· COUNT is a two-byte hexadecimal value in the range X'0003 to X'03FB inclusive, representing the number of bytes in the COMMAND/DATA field. The count excludes the STX, COUNT, LRC and ETX.
· LRC is a single-byte Longitudinal Redundancy Check character. It is calculated by performing an exclusive-OR on each byte of the data sent over the communications link excluding the STX, COUNT, LRC and the ETX.
· ETX is the End of Text character (X'03).
When the HSM receives a Transparent Async packet it:
· Checks the LRC value with that computed over the input data and returns a response message with Error 91 if a match is not obtained.
·
Checks that the Count value is between
limits. If this check fails, the HSM responds in one of two ways:
- If Count > X'03FB, it returns a response message with Error 92;
- otherwise it responds with the following error message:
Message Header : 0000
Response Code : ZZ
Error Code : 92
e.g., for Message Header length 4, the response is 0000ZZ92.
·
Checks that the number of characters received
between the Count characters and the LRC matches the value in Count. If
this check fails, it returns a response message with Error 92.
lf no errors are discovered in the Transparent Async packet, the HSM processes
the command and responds accordingly.
If the HSM discovers both errors (Error 91 and Error 92), it reports Error 92.
If the HSM reports Error 90 there is a Data Parity Error. Check the HSM Host port settings using the QH (Query Host) console command and ensure that the correct parity is in use.